using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Object_EnemyBullet : ObjectBulletBase, IClearable
{
    [SerializeField] private float _moveSpeed = 2f;
    public void SetupBullet(Vector2 direction, float damage)
    {
        _damage = damage;

        rb.velocity = direction * _moveSpeed;

        moveDir = direction;
    }

    protected override void OnTriggerEnter2D(Collider2D other)
    {
        base.OnTriggerEnter2D(other);

        PoolManager.Instance.Delease(gameObject);
    }
    
    public void HandleClear()
    {
        PoolManager.Instance.Delease(gameObject);
    }
}
